home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / macros / tip / out2-or.tip < prev    next >
Text File  |  1993-09-15  |  2KB  |  74 lines

  1. % This macro source file is from the four volume series
  2. % "TeX in Practice" by Stephan von Bechtolsheim, published
  3. % 1993 by Springer-Verlag, New York.
  4. % Copyright 1993 Stephan von Bechtolsheim.
  5. % No warranty or liability is assumed.
  6. % This macro may be copied freely if no fees other than
  7. % media cost or shipping charges are charged and as long
  8. % as this copyright and the following source code itself
  9. % is not changed. Please see the series for further information.
  10. %
  11. % Version: 1.0
  12. % Date: May 1, 1993
  13. %
  14. %
  15. % This source code is documented in 37.1.1, p. IV-160.
  16. % Original source in file "o4.TEX", starting line 69.
  17. \wlog{L: "out2-or.tip" ["o4.TEX," l. 69, p. IV-160]}%
  18. % This file DOES NOT belong to format "texip."
  19. \catcode`\@ = 11
  20. \newbox\@LeftColumnBox
  21. \newbox\@RightColumnBox
  22. \newdimen\@PageWidth
  23. \def\SetUpDC #1#2#3{% 
  24.     \@PageWidth = #1
  25.     \hsize = #2
  26.     \vsize = #3
  27. }
  28. \def\@PageLine{\hbox to \@PageWidth}
  29. \def\Header{% 
  30.     \@PageLine{%
  31.         \it Some Header Text\hfil
  32.         \PrintCurrentMonth\space \the\day, \the\year,
  33.         Page~\the\pageno
  34.     }% 
  35. }
  36. \topskip = 10pt plus 60pt
  37. \let\@ColumnMode = L
  38. \def\supereject{%
  39.     \eject
  40.     \if\@ColumnMode R
  41.         \hbox{}
  42.         \vfill\eject
  43.     \fi
  44.     \end
  45. }
  46. \output = {
  47.     \if\@ColumnMode L
  48.         \global\setbox\@LeftColumnBox = \vbox to \vsize{
  49.             \unvbox 255
  50.             \vfil
  51.         }
  52.         \global\wd\@LeftColumnBox = \hsize
  53.         \global\let\@ColumnMode = R
  54.     \else
  55.         \setbox\@RightColumnBox = \vbox to \vsize{
  56.             \unvbox 255
  57.             \vfil
  58.         }
  59.         \wd\@RightColumnBox = \hsize
  60.         \shipout\vbox{
  61.             \Header
  62.             \vskip 24pt
  63.             \@PageLine{% 
  64.                 \box\@LeftColumnBox
  65.                 \hfil
  66.                 \box\@RightColumnBox
  67.             }
  68.         }
  69.         \advancepageno
  70.         \global\let\@ColumnMode = L
  71.     \fi
  72. }
  73. \catcode`\@ = 12
  74.